package com.fsnip;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api("test-api")
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@RestController
public class ProducerApplication {

	public static void main(String[] args) {
		SpringApplication.run(ProducerApplication.class, args);
	}

	@ApiOperation(value="测试接口hello", notes="传入名称，测试接口，返回信息")// 使用该注解描述接口方法信息  
	@RequestMapping(value="/hello", method=RequestMethod.GET)
	public String index(@RequestParam String name) {
		return "hello "+name+"，this is first messge";
	}

	@RequestMapping(value="/hello1", method=RequestMethod.GET)
	public String index1(@RequestParam String name) {
		return "hello1 "+name+"，this is first messge";
	}

}
